package com.yuandian.api.management.feign;

import com.yuandian.api.management.entity.ConfResource;
import com.yuandian.bpm.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;
import java.util.Set;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteResourceService", value = "bpm-management")
public interface RemoteResourceService {

	/**
	 * 获取业务服务资源
	 * @return 通用返回对象
	 */
	@GetMapping("/returnCode/getBusinessResourceMap")
	R<Map<String, ConfResource>> getBusinessResourceMap();

	/**
	 * 根据系统id和业务编码查询业务服务资源
	 * @param systemId
	 * @param businessCode
	 * @return
	 */
	@GetMapping("/resource/{systemId}/{businessCode}")
	R<Set<String>> getResourceBySystemIdAndBusinessCode(@PathVariable("systemId") Integer systemId, @PathVariable("businessCode") String businessCode);
}
